package com.shxzz.shortlink.project.common.enums;


import com.shxzz.shortlink.project.common.convention.errorcode.ErrorCode;

/**
 * @author shxzz
 * @create 2023-12-08-19:47
 * @description 用户异常码定义
 */
public enum UserErrorCode implements ErrorCode {
    USER_TOKEN_FAIL("A000200", "用户Token验证失败"),

    USER_LOGIN_EXPIRED("A000201", "用户登录过期"),

    USER_NULL("B000200", "用户记录不存在"),

    USER_NAME_EXIST("B000201", "用户名已存在"),

    USER_EXIST("B000202", "用户记录已存在"),

    USER_SAVE_ERROR("B000203", "用户记录新增失败"),
    ;

    private final String code;

    private final String message;

    UserErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return message;
    }
}
